import {
	defineStore
} from "pinia"

import {
	ref
} from "vue"

import {
	patientMyUserApi
} from "@/api/modules/my.js"

const useMyUserStore = defineStore("myUser", () => {

	const userInfo = ref({})

	// 用户信息
	const patientMyUserApiAction = async () => {
		const res = await patientMyUserApi();
		if (res.code !== 10000) return uni.utils.toast(res.message)
		console.log(res);
		userInfo.value = res.data
	}

	return {
		userInfo,
		patientMyUserApiAction
	}
})

export default useMyUserStore